<template>
  <div>
    <el-table
        :data="list"
        height="500"
        border
        style="width: 100%"
        @row-click="chooseone"
        @row-dblclick="openDetails"
        highlight-current-row
        @current-change="handleSelectionChange"
      >
      <el-table-column width="55">
          <template slot-scope="scope">
            <el-radio v-model="radio" :label="scope.row.id">
              <span class="el-radio__label"></span>
            </el-radio>
          </template>
        </el-table-column>
        <el-table-column align="center" prop="caseNumber" width="150" label="警情编号" ></el-table-column>
        <el-table-column align="center" prop="alertNumber" label="案件编号"></el-table-column>
        <!-- <el-table-column align="center" prop="pcsNumber" label="派出所编号"></el-table-column> -->
        <el-table-column align="center" prop="caseName" label="案件名称" ></el-table-column>
        <el-table-column align="center" prop="fraud" label="诈骗手段"></el-table-column>score
        <el-table-column align="center" prop="score" label="积分" ></el-table-column>
        <el-table-column align="center" prop="layers" label="层数" >6</el-table-column>
        <el-table-column align="center" prop="caseAmount" label="涉案金额" ></el-table-column>
        <el-table-column align="center" prop="createTime" width="150" sortable label="报案时间"></el-table-column>
        <el-table-column align="center" prop="status"  width="120" label="状态">
          <template slot-scope="scope">
            <span style="color:green" v-if="scope.row.status==1">已提交</span>
            <span style="color:red" v-else-if="scope.row.status==0">未提交</span>
            <span style="color:green" v-else-if="scope.row.status==2">已生成二维码</span>
            <span style="color:green" v-else-if="scope.row.status==3">已得分</span>
            <span style="color:green" v-else-if="scope.row.status==4">报告已生成</span>
          </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      total: 0, // 总记录数
      currentPage: 1, // 当前页码
      pageSize: 10, // 每页显示10条数据
      list: [
        {
          id: 124,
          caseNumber: 'J11120',
          pcsNumber: null,
          caseName: 'J11120',
          alertNumber: 'J11120',
          fraud: '色情直播',
          caseAmount: '20',
          surveryNumber: null,
          caseBrief: 'J11120案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '2',
          boardStatus: 3,
          scoreStatus: null,
          score: 71,
          deptId: 1,
          victimName: 'J11120案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 20:25:10',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 123,
          caseNumber: 'J11119',
          pcsNumber: null,
          caseName: 'J11119',
          alertNumber: 'J11119',
          fraud: '网络博彩',
          caseAmount: '9',
          surveryNumber: null,
          caseBrief: 'J11119案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '2',
          boardStatus: 3,
          scoreStatus: null,
          score: 298,
          deptId: 1,
          victimName: 'J11119案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 20:24:14',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 122,
          caseNumber: 'J11118',
          pcsNumber: null,
          caseName: 'J11118',
          alertNumber: 'J11118',
          fraud: '客服诈骗',
          caseAmount: '80',
          surveryNumber: null,
          caseBrief: 'J11118案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '2',
          boardStatus: 3,
          scoreStatus: null,
          score: null,
          deptId: 1,
          victimName: 'J11118案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 19:36:20',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 121,
          caseNumber: 'J11117',
          pcsNumber: null,
          caseName: 'J11117案件',
          alertNumber: 'J11117',
          fraud: '客服诈骗',
          caseAmount: '70',
          surveryNumber: null,
          caseBrief: 'J11117案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '2',
          boardStatus: 3,
          scoreStatus: null,
          score: 53,
          deptId: 1,
          victimName: 'J11117案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 17:00:20',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 120,
          caseNumber: 'J11116',
          pcsNumber: null,
          caseName: 'J11116',
          alertNumber: 'J11116',
          fraud: '客服诈骗',
          caseAmount: '60',
          surveryNumber: null,
          caseBrief: 'J11116案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '1',
          boardStatus: 3,
          scoreStatus: null,
          score: null,
          deptId: 1,
          victimName: 'J11116案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 16:59:26',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 119,
          caseNumber: 'J11115',
          pcsNumber: null,
          caseName: 'J11115',
          alertNumber: 'J11115',
          fraud: '客服诈骗',
          caseAmount: '50',
          surveryNumber: null,
          caseBrief: 'J11115案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '1',
          boardStatus: 3,
          scoreStatus: null,
          score: null,
          deptId: 1,
          victimName: 'J11115案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 16:58:33',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 118,
          caseNumber: 'J11114',
          pcsNumber: null,
          caseName: 'J11114',
          alertNumber: 'J11114',
          fraud: '客服诈骗',
          caseAmount: '40',
          surveryNumber: null,
          caseBrief: 'J11114案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '1',
          boardStatus: 3,
          scoreStatus: null,
          score: null,
          deptId: 1,
          victimName: 'J11114案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 16:57:53',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 117,
          caseNumber: 'J11113',
          pcsNumber: null,
          caseName: 'J11113',
          alertNumber: 'J11113',
          fraud: '客服诈骗',
          caseAmount: '30',
          surveryNumber: null,
          caseBrief: 'J11113案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '1',
          boardStatus: 3,
          scoreStatus: null,
          score: null,
          deptId: 1,
          victimName: 'J11113案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 16:57:10',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 116,
          caseNumber: 'J11112',
          pcsNumber: null,
          caseName: 'J11112案件',
          alertNumber: 'J11112',
          fraud: '客服诈骗',
          caseAmount: '20',
          surveryNumber: null,
          caseBrief: 'J11112案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '2',
          boardStatus: 3,
          scoreStatus: null,
          score: 150,
          deptId: 1,
          victimName: 'J11112案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 16:56:22',
          delFlag: '0',
          createName: 'wang'
        },
        {
          id: 115,
          caseNumber: 'J11111',
          pcsNumber: null,
          caseName: 'J11111',
          alertNumber: 'J11111',
          fraud: '客服诈骗',
          caseAmount: '10',
          surveryNumber: null,
          caseBrief: 'J11111案件',
          accountInfo: null,
          commanderAndUnit: null,
          recorder: null,
          investigatorAndUnit: null,
          causeAndAim: null,
          access: null,
          method: null,
          result: null,
          status: '1',
          boardStatus: 3,
          scoreStatus: null,
          score: 35,
          deptId: 1,
          victimName: 'J11111案件',
          victimPhone: '15618032629',
          victimIdcard: '320825198108243111',
          victimAddress: null,
          createId: 19,
          createTime: '2021-02-01 16:54:01',
          delFlag: '0',
          createName: 'wang'
        }
      ],
      radio: null, // 如果使用单选框，定义一个model值
      currentSelectItem: {} // 当前选中的值
    }
  },
  methods: {
    handleSelectionChange(row) {
      console.log(row)
      this.currentSelectItem = row
    },
    chooseone(row) {
      this.radio = row.id
    },
    openDetails() {

    }
  }
}
</script>

<style>

</style>
